package com.heima.article.feign;

import com.heima.apis.article.IArticleClient;
import com.heima.article.service.ApArticleService;
import com.heima.model.article.dtos.ArticelDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ZQH
 * @version 1.0
 * @date 2023/8/9 21:28
 */
@RestController
public class ArticleClient implements IArticleClient {
    @Autowired
    private ApArticleService apArticleService;
    @PostMapping("/api/v1/Article/save")
    @Override
    public ResponseResult saveArticle(@RequestBody ArticelDto dto) {
        ResponseResult responseResult = apArticleService.saveArticle(dto);
        return responseResult;
    }
}
